package com.csun.cmny.provider.service.impl;

import com.csun.cmny.core.support.BaseService;
import com.csun.cmny.provider.dao.OmcLifeOldmanRoomMapper;
import com.csun.cmny.provider.model.domain.OmcLifeOldmanRoom;
import com.csun.cmny.provider.service.OmcLifeOldmanRoomService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author Lijun
 * @description:
 * @date 2019/12/26 9:56
 */
@Slf4j
@Service
@Transactional
public class OmcLifeOldmanRoomServiceImpl extends BaseService<OmcLifeOldmanRoom> implements OmcLifeOldmanRoomService {
    @Resource
    private OmcLifeOldmanRoomMapper omcLifeOldmanRoomMapper;

    @Override
    public Integer updateOne(OmcLifeOldmanRoom omcLifeOldmanRoom){
        return omcLifeOldmanRoomMapper.updateOne(omcLifeOldmanRoom);
    }

    /**
     * 根据老人Id查询房间Id
     *
     * @param oldmanId the oldman id
     *
     * @return the room id
     */
    @Override
    public Long queryRoomIdByOldmanId(Long oldmanId) {

        return omcLifeOldmanRoomMapper.queryRoomIdByOldmanId(oldmanId);
    }

}
